"""
要求：
有字符串："万过薪年，员序程马黑来，nohtyP"
用学过的方法，得到“黑马程序员”
"""
# 1
my_str = "万过薪年，员序程马黑来，nohtyP"
str1 = my_str[5:10]
str2 = str1[::-1]
print(f"结果是：{str2}")

# 2
my_str = "万过薪年,员序程马黑来,nohtyP"
str4 = my_str.replace("来"," ")
str6 = str4[::-1]
str5 = str6.split(",")
str7 = str5[1]
str8 = str7.strip()
print(f"结果是：{str8}")

# 3
my_str = "万过薪年,员序程马黑来,nohtyP"
result3 = my_str.split(",")[1].replace("来","")[::-1]
print(f"结果是:{result3}")